package jnpf.engine.util.xml;

import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.emnus.SearchMethodEnum;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ProperCond {
	@Schema(description = "表达式")
	private String logic = SearchMethodEnum.And.getSymbol();

	private Long id;

	@Schema(description = "条件")
	private List<GroupsModel> groups = new ArrayList<>();

	@Data
	public static class GroupsModel {

		@Schema(description = "表达式")
		private String logic = SearchMethodEnum.And.getSymbol();

		@Schema(description = "字段名称")
		private String field;

		@Schema(description = "操作符")
		private String operator;

		@Schema(description = "值")
		private Object value;

		@Schema(description = "子条件组")
		private List<GroupsModel> subGroups = new ArrayList<>();
	}
}


